package com.dateConstruction._06_tree;

public class TreeNode<T> {
    
    // 数据域
    public T data;
    // 父母结点链、孩子结点链、兄弟结点链
    public TreeNode<T> parent, child, sibling;
    
    // 结点层次
    public int level;
    
    
    public TreeNode(T data) {
        this.data = data;
    }
    
    // 构造方法
    public TreeNode(T data, int level, TreeNode<T> parent, TreeNode<T> child, TreeNode<T> sibling) {
        this.data = data;
        this.parent = parent;
        this.child = child;
        this.sibling = sibling;
        this.level = level;
    }
    
    public String toString() {
        return this.data + "";
    }

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        
    }

}
